#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h> 
int main()
{
	int a, b;
	scanf("%d%d", &a, &b);
	int yushu, shang;
	shang = a / b;
	yushu = a % b;
	printf("%d %d", shang, yushu);
	return 0;
}